package com.l.web.service.system.webnode;

import org.l.qiao.*;
import org.l.qiao.base.LType;

import java.util.Map;

public class WebNode extends Cluster {

    @Key(keyType = KeyType.MapKey, valueType = LType.LTYPE_STRING, check = "^[\\s\\w\u4e00-\u9fa5]{1,50}$", nullable = false)
    public static final String NAME = "name";

    @Key(keyType = KeyType.MapKey, valueType = LType.LTYPE_STRING, check = "^[\\dA-z]{24}|^$", nullable = true)
    public static final String PARENT_ID = "parentId";

    public static final String PARENT = "parent";

    public static final String DEEP = "deep";

    @Key(keyType = KeyType.MapKey, valueType = LType.LTYPE_INTEGER, check = Validate.INTEGER, nullable = false)
    public static final String INDEX = "index";

    @Key(keyType = KeyType.MapKey, valueType = LType.LTYPE_STRING, check = "^\\w+$", nullable = false)
    public static final String TYPE = "type";

    @Key(keyType = KeyType.MapKey, valueType = LType.LTYPE_STRING, check = "^.+$", nullable = false)
    public static final String URL = "url";

    @Key(keyType = KeyType.MapKey, valueType = LType.LTYPE_STRING, check = "^\\w+$", nullable = false)
    public static final String KEY = "key";

    @Key(keyType = KeyType.MapKey, valueType = LType.LTYPE_STRING, check = Validate.OBJECTID, nullable = true)
    public static final String TEMPLATE_ID = "templateId";

    @Key(keyType = KeyType.MapKey, valueType = LType.LTYPE_STRING, check = Validate.OBJECTID, nullable = true)
    public static final String LIST_TEMPLATE = "listTemplate";

    @Key(keyType = KeyType.MapKey, valueType = LType.LTYPE_BOOLEAN, check = "^0|1$", nullable = true)
    public static final String DEFAULT = "default";

    public WebNode() {
        super();
    }

    public WebNode(Map<String, Object> map) {
        super(map);
    }

}
